let page1: {
    state: object,
    actions: { [key: string]: (newState: { num: number }, actions: { type: string, value: any }) => void },
    asyncActions: any
} = {
    state: {
        num: 123
    },
    actions: {
        addself(newState: { num: number }) {
            newState.num++
        },
        addValue(newState: { num: number }, actions: { type: string, value: any }) {
            newState.num += actions.value
        }
    },
    // 自定义异步antions
    asyncActions: {
        async fetchData (dispatch: Function) {
            setTimeout(() => {
                dispatch({ type: 'addValue', value: 20 });
                // await fetch()
            }, 1000)
        }
    }
}

export default page1
